package com.piece.blog.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 题目标签 training_question_tags
 *
 * @author onepiece
 * @date 2023-09-12
 */
@Data
@NoArgsConstructor
@Entity
@Table(name = "training_question_tags")
@ApiModel(value = "题目标签")
public class TrainingQuestionTags implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "tag_id", length = 11)
    @ApiModelProperty(value = "标签ID")
    private Long tagId;

    @Column(name = "parent_id")
    @ApiModelProperty(value = "父部门id")
    private Long parentId;

    @Column(name = "ancestors")
    @ApiModelProperty(value = "祖级列表")
    private String ancestors;

    @Column(name = "tag_name")
    @ApiModelProperty(value = "标签名称")
    private String tagName;

    @Column(name = "create_by")
    @ApiModelProperty(value = "创建人ID")
    private Long createBy;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
